{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "\n",
    "# ly1 = nn.Conv1d()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([20, 64, 191, 254])\n",
      "torch.Size([20, 128, 185, 124])\n",
      "torch.Size([20, 256, 60, 59])\n",
      "torch.Size([20, 512, 18, 18])\n"
     ]
    }
   ],
   "source": [
    "m1 = nn.Conv2d(12, 64, 7, stride=(1, 3))\n",
    "m2 = nn.Conv2d(64, 128, 7, stride=(1, 2))\n",
    "m3 = nn.Conv2d(128, 256, 7, stride=(3, 2))\n",
    "m4 = nn.Conv2d(256, 512, 7, stride=(3, 3))\n",
    "# m3 = nn.Conv2d(3, )\n",
    "input = torch.randn(20, 12, 197, 768)\n",
    "o1 = m1(input)\n",
    "print(o1.size())\n",
    "o2 = m2(o1)\n",
    "print(o2.size())\n",
    "o3 = m3(o2)\n",
    "print(o3.size())\n",
    "o4 = m4(o3)\n",
    "print(o4.size())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "torch.Size([20, 33, 254])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output.shape"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py39",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
